$(function(){
    $(".logout").click(function () {
        $.ajax({
            type: "post",
            url: "/author/logout",
            datatype: "json",
            success: function (data) {
                console.log(data.code)
                if (data.code = 1) {
                    location.href = "../login.html"
                }
            }
        })
    })
})